package com.tony.mindhr.mapper;

import com.tony.mindhr.model.Menu;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: MenuMapper
 * @Auther: 皮蛋布丁
 * @Date: 2021/04/19/14:08
 * @Description:
 */
public interface MenuMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Menu record);

    int insertSelective(Menu record);

    Menu selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Menu record);

    int updateByPrimaryKey(Menu record);

    List<Menu> getMenuByHrId(Integer hrid);
    /**
    * @Description: getAllMenusWithRole 根绝角色获取菜单
    * @Param: []
    * @return: java.util.List<com.tony.mindhr.model.Menu>
    * @Author: 皮蛋布丁
    * @Date: 2021/5/17 21:49
    */
    List<Menu> getAllMenusWithRole();

    /**
    * @Description: getAllMenus 获取菜单树
    * @Param: []
    * @return: java.util.List<com.tony.mindhr.model.Menu>
    * @Author: 皮蛋布丁
    * @Date: 2021/6/3 19:51
    */
    List<Menu> getAllMenus();

    /**
    * @Description: getMidsByRid 根据用户id获取菜单id
    * @Param: [rid]
    * @return: java.util.List<java.lang.Integer>
    * @Author: 皮蛋布丁
    * @Date: 2021/6/3 20:27
    */
    List<Integer> getMidsByRid(Integer rid);
}
